home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / mcp100.zip / MCP.DOC next >
Text File  |  1992-09-05  |  16KB  |  376 lines

  1. MCP.DOC -- documentation for MCP.EXE
  2.  
  3.  
  4. WHAT IS THIS?
  5.  
  6. MCP (Master Copy) is kind of like XCOPY, but it normally only overwrites older
  7. files and it can move files.  It was written primarily for use in keeping
  8. directory structures shared by different people (or by the same person on
  9. different computers) in synchronization with each other.  It is also a quick
  10. way to implement disk mirroring style backups.
  11.  
  12.  
  13. HOW DO I RUN MCP?
  14.  
  15. Syntax:
  16. MCP.EXE source [destination] [switches]
  17.   /A = copy only files with Archive bit set (leave source archive bit set)
  18.   /D = copy files with date the same or later than Date given /D:mm-dd-yyyy
  19.        /D:dd.mm.yyyy /Dmm/dd/yy or /Ddd.mm.yy
  20.   /F = Force overwrite of system, hidden, and read only files
  21.   /H = Copy system and hidden files as well.
  22.   /L = Verbose output
  23.   /M = copy only files with archive bit set (Modify source archive bit)
  24.   /N = No overwrite
  25.   /O = Overwrite destination files
  26.   /P = Prompt before copy
  27.   /Q = Quiet (report only errors)
  28.   /R = Rename or move files
  29.   /S = /E = recurse through Subdirectories (& create empty ones)
  30.   /W = Wait for keystroke before starting copy
  31.   /? = Show help screen.
  32.  
  33. On the command line, source is a file name or directory name, which may
  34. optionally include drive and path.  It may also include DOS wild cards ? and
  35. *.  If the source is a directory, the file name *.* is assumed.
  36.  
  37. The destination is a file name or directory.  If no destination is specified,
  38. the current directory is assumed.  If there are wild card characters in the
  39. destination file name, they will be filled in with the corresponding
  40. characters in the source file name.  If it is not obvious if the destination
  41. is a file or directory, you may be asked which you meant.  To ensure that the
  42. destination is interpreted as a directory instead of a file, end the directory
  43. name in "\" or ensure that the destination directory already exists.  If the
  44. destination directory does not exist, it will be created.
  45.  
  46. Switches all start with "/" (not "-", since - is a valid file name character
  47. in DOS), and may be before, between, and/or after the source and destination. 
  48. Switches may be combined.  In case of a conflict between switches, the one
  49. that is farthest to the right on the command line takes precedence.  For
  50. brevity, command line switches may be run together after a single "/". 
  51. Switches are not case sensitive.
  52.  
  53. /A (Archive) and /M (Modify archive) both specify that only files that have
  54. the DOS directory archive bit set (indicating that they have been changed
  55. since they were last backed up) should be copied.  /A does not alter the
  56. archive bit on the source file.  /M clears the archive bit of the source file
  57. to indicate that it has been backed up.  The archive bit of the destination
  58. file is always set when using MCP.  These options can be used for backing up
  59. data when the largest file you want to back up will fit on your destination
  60. media.  If the largest file you want to back up is bigger, a regular backup
  61. program is more appropriate than MCP.  However, for some small but important
  62. files, backing up with a copy command like MCP makes more sense, because the
  63. file itself is not altered, making restoration possible even without the
  64. original backup program.
  65.  
  66. For example,
  67. MCP /A C:\WORK\DOC\*.* A:
  68. copies all files in C:\WORK\DOC to the floppy disk in A: that have not been
  69. marked as backed up.
  70.  
  71. /D (Date) is always followed by a date, with no space in between the /D and
  72. the date.  The colon following the D is optional.  The order of the date is
  73. month day year if you use "/" or "-" to separate the numbers in the date.  If
  74. you use "." to separate the numbers in the date, the order is day month year. 
  75. The year can be specified with either the last two digits or all four digits. 
  76. If you specify the last two digits, the year is assumed to be in the range
  77. 1980 through 2079.  The month must be expressed as a number between 1 and 12. 
  78. Leading zeros on month and day are optional.
  79.  
  80. For example, the following commands all copy everything with a file date on or
  81. after December 25, 1991 from the current directory to D:\SAVE\.
  82.  
  83. MCP /D12/25/91 *.* D:\SAVE\
  84. MCP /D:12/25/91 *.* D:\SAVE\
  85. MCP *.* D:\SAVE\ /D12/25/1991
  86. MCP /D12-25-91 *.* D:\SAVE\
  87. MCP *.* /D12-25-1991 D:\SAVE\
  88. MCP /D25.12.91 *.* D:\SAVE\
  89. MCP /D:25.12.1991 *.* D:\SAVE\
  90.  
  91. /F (Force) forces overwriting of Hidden, System, and Read Only files. 
  92. WARNING:  use this option with caution.  It is very useful for some
  93. situations, but could have some undesired side effects if you overwrite some
  94. files of this type.
  95.  
  96. /H (Hidden & system) allows files with the system and hidden attribute to be
  97. copied.  Note that the XCOPY that comes with DOS 5 will not copy hidden files,
  98. but earlier versions will.  The system and hidden attributes will be applied
  99. to the destination files when they are present in the source files.  Note: 
  100. copying the two hidden system files from a boot drive to another drive will
  101. not necessarily make the destination bootable.  Use the DOS SYS command for
  102. that purpose.
  103.  
  104. /L (Loud) causes extra screen output to be generated, including the names of
  105. all files that are skipped.
  106.  
  107. /N (No overwrite) prevents any destination files from being overwritten,
  108. regardless of the file dates and attributes involved.  The default is to allow
  109. overwrites of destination files with an earlier file date.  This is the
  110. opposite of /O (Overwrite always).
  111.  
  112. /O (Overwrite always) causes destination files to be overwritten regardless of
  113. its file date.  The default is to allow overwrites only of destination files
  114. with an earlier file date.  This is the opposite of /N (No overwrite).
  115.  
  116. /P (Prompt) asks you if you want to copy each file with a Y/n prompt.  "N" or
  117. "n" will cause the file to be skipped.  Most other keys, including "Y" and "y"
  118. will cause the file to be copied.  The "Enter" key need not be pressed after
  119. the "y" or "n".
  120.  
  121. For example,
  122. MCP /P *.* A:
  123. lets you pick exactly which files you want to copy to drive A:, one by one.
  124.  
  125. /Q (Quiet) suppresses all screen output except for error messages and the help
  126. screen in response to a command line error or /?.
  127.  
  128. For example,
  129. MCP /Q /M C:\WORK\*.* F:\MASTER\FRED\
  130. in a network login script would be a subtle way to back up some critical
  131. directory on a users's hard disk to a network directory, where it could be
  132. moved to tape or something.
  133.  
  134. /R (Rename or move) causes files to be renamed if the source and destination
  135. are on the same disk, or copied then the original deleted (after a successful
  136. copy) if the source and destination are on different disks.  If the copy
  137. fails, the original is left intact.  When used with the /S option, emptied
  138. subdirectories are not removed.
  139.  
  140. For example,
  141. MCP C:\STUFF\*.DOC D:\OLDJUNK\ /R
  142. moves every .DOC file in C:\STUFF\ to D:\OLDJUNK\.
  143.  
  144. /S or /E (Subdirectory copy) copies files and subdirectories from the
  145. destination to the source, making subdirectories as needed.  Empty
  146. subdirectories are created as well.  Using /S and/or /E on the command line of
  147. MCP is the same as using both /S and /E on the command line of XCOPY.
  148.  
  149. /V does nothing.
  150.  
  151. /W (Wait) causes the prompt "Press a key when ready to start copy . . ." to be
  152. displayed, and the program to pause until you hit a key before starting the
  153. copy process.  This is for use with floppy only systems, where the MCP command
  154. may reside on a disk other than the one you want do do the copy on.
  155.  
  156. /? (Help) shows the help screen.
  157.  
  158.  
  159. ZERO LENGTH FILES
  160.  
  161. Unlike XCOPY, MCP copies zero length files and, if copying subdirectories,
  162. always copies empty subdirectories.  It also duplicates the file attributes
  163. (system, hidden, read only) of the source file in the destination file, except
  164. for the archive bit, which is always set in the destination file.
  165.  
  166.  
  167. PROMPTS
  168.  
  169. There are several prompts possible in MCP.  At each of the prompts, the
  170. default answer (if applicable) is indicated with a capital letter.  Answers to
  171. the prompts are not case sensitive, and are all only one keystroke.  Pressing
  172. "Enter" after a letter is not required.  The "Enter" key is ignored at all
  173. prompts except for the "Press a key when ready to start copy . . ." prompt
  174. caused by the /W option.  In addition to the listed responses at any prompt,
  175. "Esc", "Ctrl-C", and "Ctrl-Break" will terminate MCP.  "Ctrl-Break" will also
  176. terminate a copy in progress, even if the program is not looking for an answer
  177. to a question.
  178.  
  179.  
  180. filename Y/n?
  181.  
  182. This is the format used in asking if you want to copy a particular file when
  183. you put /P on the command line.  "N" means that you do not want to copy the
  184. file, and most other keys (including "Y") mean that you do want to copy the
  185. file.
  186.  
  187.  
  188. Only 512 bytes available on A:.  filename requires 1234 bytes.
  189. Retry with new disk, Try new disk later, Skip, or Cancel (r/T/s/c)?
  190.  
  191. If your destination is on a fixed disk, press "S" to skip just this file or
  192. "C" to cancel and exit MCP.  If your destination is a removable disk, you may
  193. skip the current file or cancel as with a fixed disk destination.  You may
  194. also wish to change disks and then press "R" to retry copying the current
  195. file, or press "T" to try copying the next file (which may fit) and add the
  196. current file to a list to be tried again later (on a different floppy disk). 
  197. Most other keys act the same as "T".
  198.  
  199.  
  200. No more room on drive A:
  201. Retry with new disk, Skip or Cancel (R/s/c)?
  202.  
  203. Your destination disk has no more room on it.  Change the disk and press "R"
  204. to retry, or "C" to exit the MCP program.
  205.  
  206.  
  207. Error writing to filename.
  208. Retry, Skip, or Cancel (r/S/c)?
  209.  
  210. MCP encountered one of many possible errors (insufficient network rights, bad
  211. disk sectors, hardware failures, disk full even though it had enough room to
  212. start the copy, etc.).  "R" restarts the copy from the beginning of the file. 
  213. "S" skips this file and tries the next.  "C" cancels the copy and exits MCP.
  214.  
  215.  
  216. Does destination specify a File name
  217. or Directory on the target (f=File, D=Directory)? 
  218.  
  219. The destination directory is not an existing directory and the name does not
  220. end with "\", and there may be more than one source file (indicated by wild
  221. cards in the name or a /S or /E switch).  Press "F" if you intended that the
  222. destination is a file name, or "D" if you intended that the destination is a
  223. directory.  If you decide that the command line was in error, press "Esc".
  224.  
  225.  
  226. Press a key when ready to start copy . . .
  227.  
  228. You used the /W option.  Press "Esc", "Ctrl-C", or "Ctrl-Break" if you decide
  229. you really didn't want to copy anything after all, or press any other key to
  230. start the copy process.
  231.  
  232.  
  233. ERROR MESSAGES
  234.  
  235. Break!
  236.  
  237. You pressed Ctrl-Break, Ctrl-C, or Esc to halt the program.
  238.  
  239.  
  240. Unable to create filename
  241.  
  242. The destination file name may have been on an invalid drive, have contained
  243. invalid characters, been in the root directory with all directory entries
  244. filled, been on a network directory with insufficient rights, been too long
  245. for DOS or the network operating system to create, or some other similar
  246. problem.
  247.  
  248.  
  249. Files may not be copied onto themselves.
  250.  
  251. The first step in copying a file is to create a new file of zero length with
  252. name of the destination file.  If the source and destination files are the
  253. same, this action would destroy the source file.
  254.  
  255.  
  256. Destination path is too long.
  257.  
  258. The most likely cause of this error message is starting a recursive copy
  259. command (like MCP /S C:\*.* C:\SUBDIR\).  This causes everything in the root
  260. directory of drive C: to be copied to C:\SUBDIR\ and C:\SUBDIR\SUBDIR\ and
  261. C:\SUBDIR\SUBDIR\SUBDIR\ and so on.  Older versions of XCOPY allow this, the
  262. latest one does not.  MCP allows the recursion to go on until the resulting
  263. path name exceeds DOS limits.  This is a great way to fill up a hard disk in a
  264. hurry.
  265.  
  266.  
  267. Not enough memory to run MCP.EXE
  268.  
  269. Try reducing the number of TSR programs, or if you are shelled out to DOS from
  270. another program, exit that other program.
  271.  
  272.  
  273. Access denied.
  274.  
  275. DOS (or some network software) returned an error code indicating that the
  276. operation was not allowed.  Some things that can do this is trying to create a
  277. directory when a file with the same name already exists or trying to write to
  278. a network directory where you have insufficient rights.
  279.  
  280.  
  281. Bad file number.
  282.  
  283. Something strange is going on that confused DOS and/or MCP -- probably some
  284. error associated with a multitasking environment.
  285.  
  286.  
  287. Attempt to copy more than one file to file.
  288.  
  289. MCP does not concatenate files (use DOS COPY to do that), so copying more than
  290. one file to a single file means that all that ends up in the destination file
  291. is the last file copied.  If this were done with the /R option, all but the
  292. last file would be destroyed.  Therefore, only one file is allowed to be
  293. copied to a file.  The trap that catches this is not foolproof (although it is
  294. reasonably difficult to fool), so you should still take care on the command
  295. line to avoid specifying such an action.
  296.  
  297.  
  298. Unable to open filename
  299.  
  300. The specified file name may not be valid, or may be on a network directory
  301. where you have insufficient rights.
  302.  
  303.  
  304. Ran out of memory keeping track of files to retry.
  305.  
  306. Each file name source and destination that is "remembered" to try later when
  307. you run out of room copying to a diskette takes up some conventional RAM. 
  308. After several thousand of these (more or less, depending on how much RAM you
  309. have available), you may run out.
  310.  
  311.  
  312. ERRORLEVEL
  313.  
  314. When running MCP in a batch file, you can test for the following values of
  315. ERRORLEVEL after MCP runs:
  316.  
  317. 0 = Normal completion.
  318. 2 = "Ctrl-Break", "Ctrl-C", or "Esc" pressed, or copy canceled with "C".
  319. 3 = Unable to write to destination file.
  320. 4 = Attempted to copy file onto itself.
  321. 5 = Destination path is too long.
  322. 6 = Not enough memory to run.
  323. 7 = Access denied.
  324. 8 = Bad file number error returned by DOS.
  325. 9 = Attempt to copy more than one file to one destination file.
  326. 11 = Command line error or help requested.
  327. 12 = Unable to open input file.
  328. 13 = Ran out of memory keeping track of files to retry.
  329.  
  330.  
  331. A COPY PROGRAM BY ANY OTHER NAME
  332.  
  333. MCP comes from M as in Master or Mike's and CP as in the name for the Unix
  334. copy command.  Call it whatever you like, by renaming it, creating an alias
  335. with DOSKEY or a similar utility, or by creating a batch file.  You might want
  336. to create a batch bile called MOVE.BAT (or MV.BAT) that contains the line:
  337.  
  338. MCP /R %1 %2 %3 %4 %5 %6 %7 %8 %9
  339.  
  340.  
  341. LIMITATIONS
  342.  
  343. MCP does not do concatenation.  It does not get the date format from the DOS
  344. country table.  It does not do Japanese dates in year-month-day format.  All
  345. of its error messages are in English.  It does not do a full screen interface.
  346. It doesn't skip zero length files just because they are zero length.  It
  347. doesn't skip creation of empty subdirectories when /S is used.  /V does
  348. absolutely nothing.  It doesn't remove any subdirectories.  It doesn't predict
  349. winning lottery numbers.  On the other hand, it does do some things that I
  350. always thought that XCOPY should have done. 
  351.  
  352.  
  353. COPYRIGHT NOTICE & DISCLAIMER
  354.  
  355. Master Copy version 1.00 of  5 September 1992
  356.  
  357. Copyright (C) 1992 Michael Paul Johnson.  All rights reserved.  No warranty.
  358. Shareware: to register, please send $15.00 (or $25.00 if you also want
  359. original disks) to:
  360.  
  361.     Mike Johnson
  362.     PO BOX 1151
  363.     LONGMONT CO 80502-1151
  364.     USA
  365.  
  366. Registration entitles you to support on the Rainbow Missions BBS
  367. (303-938-9654) and by mail, and to notification of major upgrades at discount
  368. rates.
  369.  
  370. Although I try to write perfect software, there is a chance that I goofed up
  371. in some way.  If you find this to be the case, please let me know so that I
  372. can repair it.  Because I can't test every possible use of this software on
  373. every system that it might be run on, and because I have no control over the
  374. way shareware gets passed around, you use this software entirely at your own
  375. risk.  Prices are subject to change without notice.
  376.